package com.llxy.worker.service.impl;

import com.llxy.worker.dto.NewsDTO;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import com.llxy.worker.domain.News;
import com.llxy.worker.mapper.NewsMapper;
import com.llxy.worker.service.NewsService;

import java.util.List;

@Service
public class NewsServiceImpl implements NewsService{

    @Resource
    private NewsMapper newsMapper;

    @Override
    public int deleteByPrimaryKey(Integer id) {
        return newsMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(News record) {
        return newsMapper.insert(record);
    }

    @Override
    public int insertSelective(News record) {
        return newsMapper.insertSelective(record);
    }

    @Override
    public NewsDTO selectByPrimaryKey(Integer id) {
        return newsMapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(News record) {
        return newsMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(News record) {
        return newsMapper.updateByPrimaryKey(record);
    }

    @Override
    public List<NewsDTO> selectList(News news) {
        return newsMapper.selectList(news);
    }

}
